package com.google.code.jtasks.bugzilla.config;

import com.google.code.jtasks.bugzilla.fields.BugzillaStandardField;

/**
 * Models a Bugzilla repository's allowed {@link BugzillaStandardField#PRIORITY} values.
 */
public final class BugzillaPriority
{
	private final String label;
	private final int sortkey;

	/**
	 * Constructs a new {@link BugzillaPriority} instance.
	 * 
	 * @param label
	 *            the unique label/name of the {@link BugzillaPriority}
	 * @param sortValue
	 *            an integer value indicating the relative importance of the {@link BugzillaPriority}, where
	 *            lower values indicate a higher priority
	 */
	public BugzillaPriority(String label, int sortValue)
	{
		this.label = label;
		this.sortkey = sortValue;
	}

	/**
	 * Returns the unique label/name of the {@link BugzillaPriority}.
	 * 
	 * @return the unique label/name of the {@link BugzillaPriority}
	 */
	public String getLabel()
	{
		return label;
	}

	/**
	 * Returns an integer value indicating the relative importance of the {@link BugzillaPriority}, where
	 * lower values indicate a higher priority.
	 * 
	 * @return an integer value indicating the relative importance of the {@link BugzillaPriority}, where
	 *         lower values indicate a higher priority
	 */
	public int getSortkey()
	{
		return sortkey;
	}
}
